** Make figure that attempts to confirm identification.  Plot outcomes for GPs
** in households with 1 vs 2+ kids.  Should see debt fall coincide with
** expansion of EITC for 2+ kid households.
**
** Plot by calendar year of interview.  Don't plot points that rely on fewer
** than 30 observations in calculation of mean.
********************************************************************************


use OrganizedOldGenData

keep if N_PotentialDep==1

keep rhcalyr AnyDebt AnyCCDebt ln_r_Debt ExcellentVeryGoodHealth EITC_v3
collapse (count) N_debt=AnyDebt N_health=ExcellentVeryGoodHealth N_EITC=EITC_v3 (mean) AnyDebt AnyCCDebt ln_r_Debt ExcellentVeryGoodHealth EITC_v3, by(rhcalyr)
gen OneDep=1
save DataForOutcomeFig_calyr, replace
clear



use OrganizedOldGenData

keep if N_PotentialDep>1

keep rhcalyr AnyDebt AnyCCDebt ln_r_Debt ExcellentVeryGoodHealth EITC_v3
collapse (count) N_debt=AnyDebt N_health=ExcellentVeryGoodHealth N_EITC=EITC_v3 (mean) AnyDebt AnyCCDebt ln_r_Debt ExcellentVeryGoodHealth EITC_v3, by(rhcalyr)
gen TwoPlusDeps=1
append using DataForOutcomeFig_calyr
save DataForOutcomeFig_calyr, replace
clear




*********************
** EITC Figure

use DataForOutcomeFig_calyr
drop if N_EITC<30
graph twoway (connected EITC_v3 rhcalyr if OneDep==1) || (connected EITC_v3 rhcalyr if TwoPlusDeps==1)  , scheme(s1mono)   legend(label(1 "One Dep") label(2 "Two Plus Deps") )

graph export IdentificationFig_EITC.eps, replace
clear


*************************************
** AnyDebt and AnyCCDebt Figures

use DataForOutcomeFig_calyr
drop if N_debt<30
graph twoway (connected AnyDebt rhcalyr if OneDep==1) || (connected AnyDebt rhcalyr if TwoPlusDeps==1)  , scheme(s1mono)   legend(label(1 "One Dep") label(2 "Two Plus Deps") )
graph export IdentificationFig_AnyDebt.eps, replace

graph twoway (connected AnyCCDebt rhcalyr if OneDep==1) || (connected AnyCCDebt rhcalyr if TwoPlusDeps==1)  , scheme(s1mono)   legend(label(1 "One Dep") label(2 "Two Plus Deps") )
graph export IdentificationFig_AnyCCDebt.eps, replace

clear


*************************************
** ExcellentVeryGoodHealth Figure

use DataForOutcomeFig_calyr
drop if N_health<30
graph twoway (connected ExcellentVeryGood rhcalyr if OneDep==1) || (connected ExcellentVeryGood rhcalyr if TwoPlusDeps==1)  , scheme(s1mono)   legend(label(1 "One Dep") label(2 "Two Plus Deps") )
graph IdentificationFig_Health.eps, replace


